#! /bin/bash

export CFLAGS="-march=native -mtune=generic  -O2 -g -pipe -fstack-protector -Wall -Wno-parentheses -Wno-format -Wno-unused-value -D_FORTIFY_SOURCE=2"

dirs=('enesim' '../ender' '../etch' '../egueb')

nbrdirs=${#dirs[@]}

for ((i=0;i<nbrdirs;i++)); do
    cd ${dirs[${i}]} || exit 1
    make clean
    svn up || exit 1
    ./autogen.sh --prefix=$HOME/local/e17 || exit 1
    make -j 3 install || exit 1
done
